# 导入redis
from redis import StrictRedis



class Config:
    DEBUG = None

    # 配置秘钥
    SECRET_KEY = 'zmrlt1JLJIZNeE7tINsQyFtA+f6dJvuua5iEWcu7RFiz'

    # 配置信息
    SESSION_TYPE = 'redis'
    SESSION_REDIS = StrictRedis(host='127.0.0.1', port=6379)
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 86400

    # 配置浏览器信息
    SQLALCHEMY_DATABASE_URI = 'mysql://root@localost/info3_python37_exercise'
    SQLALCHEMY_TRACK_MODIFICATIONS = False


class DevelopmentConfig(Config):
    DEBUG = True
class ProductionConfig(Config):
    DEBUG = False

config_dict = {
    'dev':DevelopmentConfig,
    'pro':ProductionConfig
}